<div class="box">

  <div class="box-header">
    <div class="row">
        <div class="col-sm-7">
            <div class="box-tools search-form pull-right">
                <div class="input-group input-group-sm">
                    <input type="text" name="username" style="width: 200px;" class="form-control pull-right" value="{:input('username')}" placeholder="用户名">
                    <div class="input-group-btn">
                      <button type="button" id="searc"  onclick="frozen(1)" class="btn btn-info btn-flat"><i class="fa 	fa-remove"></i>冻结</button>
                    </div>
                    <div class="input-group-btn" style="padding-left:20px;">
                        <button type="button" id="searchs"   onclick="frozen(2)" class="btn btn-info btn-flat"><i class="fa fa-check"></i>解冻</button>
                    </div>
                </div>
           </div>
        </div>
    </div>
  </div>
    <div class="box-footer">
        <a class="btn" onclick="javascript:history.back(-1);return false;"><i class="fa fa-history"></i> 返 回</a>
    </div>

</div>
<script>
    function chakan(id,str){
        layer.tips(str, '.tmd'+id);
    }
    function frozen(dj){
        var username=$("input[name='username']").val();
        layer.confirm('确定此操作？', {
            time: 0 //不自动关闭
            ,btn: ['确定', '取消']
            ,yes: function(index){
                layer.close(index);
                $.post("{:url('frozenUser')}",{username:username,dj:dj},function(data){
                    if(data.code == 0){
                        layer.alert(data.msg);
                        location.reload();
                    }else{
                        layer.msg(data.msg);
                    }
                },'json');
            }
        });
    }
</script>